package io.kiki.sba.registry.core.model;

import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;

@Setter
@Getter
public class Result implements Serializable {

    private static final long serialVersionUID = 1L;

    private boolean success;

    private String message;

    public Result() {
    }

    public Result(boolean success, String message) {
        this.success = success;
        this.message = message;
    }

    public static Result failed(String message) {
        return new Result(false, message);
    }

    public static Result success() {
        return new Result(true, null);
    }


}
